<template>

  <div>
    <button @click="isShow=!isShow">显示/隐藏</button>


    <transition appear>
      <h1 v-show="isShow" key="1" class="animate"> 你好啊</h1>
    </transition>
  </div>
</template>

<script>
import "animate.css"
export default {
  name: "Test",
  data(){

    return {
      isShow:true
    }
  }
}
</script>

<style scoped>
h1{
  background: cadetblue;
}

.v-enter-active{

  animation: whu 0.6s linear;
}
.v-leave-active{
  animation: whu 0.6s linear reverse;
}
@keyframes whu {

  from{
    transform: translate(-100%);
  }
  to{
    transform: translate(0);
  }
}
</style>
